package com.fengplus.demo.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;

@Component
@FeignClient(value = "EUREKA-PROVIDER-SERVICE", fallback = HystrixFallbackService.class)
public interface HystrixService {

    @GetMapping("/hystrix/ok")
    String infoOk();

    @GetMapping("/hystrix/error")
    String infoError();

    @GetMapping("/hystrix/timeout")
    String infoTimeout();

    @GetMapping("/hystrix/global")
    String infoGlobal();

    @GetMapping("/hystrix/feign")
    String infoFeign();

}
